package cn.etynit.domain;

import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author etyn
 * @since 2022-12-09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_expense")
public class Expense extends Model<Expense> {

    private static final long serialVersionUID = 1L;

    /**
     * 费用是否支付  1：已支付  2：未支付
     */
    public static final Integer HAVE_PAID = 1;
    public static final Integer NON_PAYMENT = -1;

    /**
     * 缴费类型:1：电费，2：水费，3：燃气费 4:停车费
     */
    public static final Integer PARKING_CHARGE = 4;
    public static final Integer WATER_RATE = 3;
    public static final Integer GAS_FEED = 2;
    public static final Integer ELECTRIC_CHARGE = 1;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 操作员工id
     */
    @TableField("employee_id")
    private Long employeeId;
    /**
     * 费用生成月份
     */
    private Integer month;
    /**
     * 生成时间
     */
    private Date time;
    /**
     * 是否缴费：1：已缴费，-1：未缴费
     */
    private Integer pay;
    /**
     * 缴费时间
     */
    @TableField("pay_time")
    private Date payTime;

    /**
     * 费用类型：1：电费，2：水费，3：燃气费 4:停车费
     */
    private Integer type;

    /**
     * 缴费金额
     */
    private BigDecimal money;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getPay() {
        return pay;
    }

    public void setPay(Integer pay) {
        this.pay = pay;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Expense{" +
        ", id=" + id +
        ", userId=" + userId +
        ", employeeId=" + employeeId +
        ", month=" + month +
        ", time=" + time +
        ", pay=" + pay +
        ", payTime=" + payTime +
        "}";
    }
}
